-
Notifications
You must be signed in to change notification settings - Fork 228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update FindOwner.py #87
base: master
Are you sure you want to change the base?
Conversation
WalkthroughThe recent update to Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Outside diff range, codebase verification and nitpick comments (2)
Investigation/FindOwner.py (2)
Line range hint
25-36
: Revert the hardcoding of the phone number to maintain flexibility.Hardcoding the phone number reduces the function's flexibility and reusability. It is better to keep the phone number as a parameter.
-async def run(playwright,phone_number,email,password): +async def run(playwright,email,password): global page display = Display(visible=0, size=(1600, 1200)) display.start() firefox = playwright.firefox browser = await firefox.launch(headless=True) page = await browser.new_page() await page.goto("https://truecaller.com") - await page.locator("#app > main > header > div > form > input").fill(+17877189728) + await page.locator("#app > main > header > div > form > input").fill(phone_number) await page.locator("#app > main > header > div > form > button").click() await page.locator("#app > main > div > div > a:nth-child(2)").click() await GoogleMail(email,password) await getName() await browser.close()
Line range hint
37-40
: Update themain
function to match therun
function's signature.The
main
function needs to be updated to match the changes in therun
function's signature.-async def main(phone_number,email,password): +async def main(email,password): async with async_playwright() as playwright: - await run(playwright,phone_number,email,password) + await run(playwright,email,password)
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- Investigation/FindOwner.py (1 hunks)
Additional comments not posted (3)
Investigation/FindOwner.py (3)
Line range hint
5-13
: LGTM!The
GoogleMail
function correctly handles Google login using Playwright.
Line range hint
14-22
: LGTM!The
getName
function correctly retrieves the name from the page.
Line range hint
23-24
: LGTM!The
printName
function correctly returns the global variablename
.
Summary by CodeRabbit